# coding:utf-8
"""
description:配置全局参数
"""
import time, os

# 获取项目路径
# project_path = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)[0]), '.'))
project_path = os.path.abspath(
    os.path.join(os.path.dirname(os.path.split(os.path.realpath(__file__))[0]), '.'))  # python特有封装方法
print("project_path%s:" % project_path)

# 配置文件
CONFIG_DIR = os.path.join(project_path, "config", "DataBaseAndEmail.ini")

# 测试用例代码存放路径（用于构建suite,注意该文件夹下的文件都应该以test开头命名）
test_case_path = os.path.join(project_path, "test_case")

# 测试报告存储路径，并以当前时间作为报告名称前缀
report_path = os.path.join(project_path, "report")
report_name = report_path + time.strftime('%Y%m%d%H%S', time.localtime())

# 日志目录
LOG_DIR = os.path.join(project_path, "logs")
# 测试用例数据文件
TEST_DATA_YAML = os.path.join(project_path, "test_data")
# 页面元素数据文件
TEST_Element_YAML = os.path.join(project_path, "test_yaml")

# UnautomatedRecord.txt文件
record_path = project_path + "\\UnautomatedRecord.txt"